<%@ include file="/WEB-INF/views/admin/header.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<div id="section">
	<div id ="mainContent">
			
			
			<div id="labelPage">ข้อมูล ผู้ใช้งาน</div>
			
			<div id="ctrlWrap">
				<div id="ctrlL">
					
					<form:form  action="userSearch" method="post" id="search">
						ชื่อ login : <input type="text" name="loginName" id="loginName" /> 
						<button type="submit">ค้นหา</button>				
					</form:form>
					
				</div>	
				<div id="ctrlR"><a href="userAddForm"><img  src="${context}/resources/img/add.jpg"/></a></div>
			</div>
			
			<table class="tableList">
				<tr class="tableHeader">
					<td>แถวที่</td>
					<td>login</td>		
					<td>name</td>
					<td>password</td>
					<td>loginDt</td>
					<td>Action</td>
				</tr>
				<c:forEach items="${users}" var="user" varStatus="index">
				<tr <c:if test="${index.count % 2 == 0}"> class="rowtd"</c:if>>
					<td>${index.count}</td>
				    <td>${user.login}</td>
				    <td>${user.name}</td>
				    <td>${user.password}</td>
				    <td>${user.loginDt}</td>
				    <td>
				    	<a href="userEditForm?id=${user.userId}"><img  src="${context}/resources/img/edit.jpg"/></a> |
				    	<a href="userDelete?id=${user.userId}"><img  src="${context}/resources/img/delete.jpg"/></a>
				    </td>
				</tr>    
				</c:forEach>
				
			</table>
		
	</div>	
</div>
<%@ include file="/WEB-INF/views/admin/footer.jsp" %>



